home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / GE_VSRC.ZIP / PMODE.INC < prev    next >
Text File  |  1994-02-02  |  2KB  |  66 lines

  1. extrn   v86r_eax:dword, v86r_ebx:dword, v86r_ecx:dword, v86r_edx:dword
  2. extrn   v86r_esi:dword, v86r_edi:dword, v86r_ebp:dword
  3. extrn   v86r_ah:byte, v86r_al:byte, v86r_bh:byte, v86r_bl:byte
  4. extrn   v86r_ch:byte, v86r_cl:byte, v86r_dh:byte, v86r_dl:byte
  5. extrn   v86r_ax:word, v86r_bx:word, v86r_cx:word, v86r_dx:word
  6. extrn   v86r_si:word, v86r_di:word, v86r_bp:word
  7. extrn    v86r_ds:word, v86r_es:word, v86r_fs:word, v86r_gs:word
  8. extrn    _selcode:word, _seldata:word, _selzero:word, _lomembase:dword
  9. extrn    _lomemtop:dword, _himembase:dword, _himemtop:dword, _pspa:dword
  10. extrn   _code16a:dword, _code32a:dword, _getirqvect:dword, _setirqvect:dword
  11. extrn   _sysbyte0:byte, _irqmode:word, _setselector:dword, _exitcode:byte
  12.  
  13. extrn   _getmem:near, _getlomem:near, _gethimem:near, _lomemsize:near
  14. extrn   _himemsize:near, _ret:near, _exit:near, _getirqmask:near
  15. extrn   _setirqmask:near, _rmpmirqset:near, _rmpmirqfree:near
  16. extrn   _getselector:near, _freeselector:near
  17.  
  18. ; Convert physical pointer to realative pointer
  19. @rlp    macro reg, ptr
  20.         mov ®,&ptr
  21.         sub ®,_code32a
  22. endm
  23.  
  24. ; Convert realative pointer to physical pointer
  25. @php    macro reg, ptr
  26.         mov ®,&ptr
  27.     add ®,_code32a
  28. endm
  29.  
  30. ; Output a byte to DX
  31. @outb           macro   val
  32.         mov al,&val
  33.         out dx,al
  34. endm
  35.  
  36. ; Output a word to DX
  37. @outw           macro   val
  38.         mov ax,&val
  39.         out dx,ax
  40. endm
  41.  
  42. ; Get interrupt flag status
  43. @gif    macro
  44.         mov ax,902h
  45.         int 31h
  46. endm
  47.  
  48. ; Get interrupt flag status and clear
  49. @gifc   macro
  50.         mov ax,900h
  51.         int 31h
  52. endm
  53.  
  54. ; Get interrupt flag status and set
  55. @gifs   macro
  56.         mov ax,901h
  57.         int 31h
  58. endm
  59.  
  60. ; Get interrupt flag status and set to AL (0=clear, 1=set)
  61. @gifal  macro
  62.         mov ah,9
  63.         int 31h
  64. endm
  65.  
  66.